
#include "main.hpp"


#define NFC_TAG "event_task"

static QueueHandle_t event_queue = NULL;

#ifdef __cplusplus
extern "C" {
#endif


void event_SendFromISR(uint32_t ulEventID)
{
    xQueueSendFromISR(event_queue, &ulEventID, NULL);
}


void event_task(void *pvParameter)
{
    uint32_t event_num;
    for(;;) 
    {
        if(xQueueReceive(event_queue, &event_num, portMAX_DELAY)) 
        {
            chsc6x_get_dot();
        }
    }
}


void event_Creat(void)
{
    event_queue = xQueueCreate(3, sizeof(uint32_t));
    xTaskCreatePinnedToCore(event_task, "event_task", 2048, NULL, 0, NULL, 1);
}


#ifdef __cplusplus
}
#endif
